package com.glorious.api.fallback;

import com.glorious.api.AppUserFeignClient;
import com.glorious.api.OAuthClientFeignClient;
import com.glorious.common.Result;
import com.glorious.common.ResultCode;
import com.glorious.dto.response.appuser.AppUserAuthResponse;
import com.glorious.entities.AppUser;
import com.glorious.entities.OauthClientDetails;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

@Slf4j
@Component
public class AppUserFeignFallbackClient implements AppUserFeignClient {


    @Override
    public Result<Long> add(AppUser appUser) {
        log.error("feign远程调用用户服务异常后的降级方法");
        return Result.failed(ResultCode.DEGRADATION);
    }

    @Override
    public Result<AppUserAuthResponse> loadUserByOpenId(String openid) {
        log.error("feign远程调用用户服务异常后的降级方法");
        return Result.failed(ResultCode.DEGRADATION);
    }

    @Override
    public Result<AppUserAuthResponse> loadUserByMobile(String mobile) {
        log.error("feign远程调用用户服务异常后的降级方法");
        return Result.failed(ResultCode.DEGRADATION);
    }
}
